home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12960 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  904 b 

  1. Path: news.london.sinet.slb.com!news
  2. From: Laurent Darton <darton@macon.wm.slb.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Macro and printf
  5. Date: Wed, 03 Apr 1996 18:36:12 -0800
  6. Organization: Schlumberger SINet, London, England
  7. Message-ID: <3163359C.A47@macon.wm.slb.com>
  8. NNTP-Posting-Host: macon14.macon.wm.slb.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (Win16; I)
  13.  
  14. Hi everyall
  15.  
  16. I would like to define a macro "myprintf" which does (for the moment only 
  17. a sprintf) Here is an example :
  18.  
  19. #define myprintf(object) sprintf(fd,object);
  20.  
  21. the problem is when I want to put an argument %s,%d, with parameter, my 
  22. macro cannot manage that, with only a single string it works but never 
  23. with something complex. I suppose I have to use # and ## symbol but I 
  24. don't know how to do that.
  25. Any help will be appreciated..
  26. Thanks in advance
  27. Laurent
  28.